﻿namespace apitest.Application.Entities.Pms
{
    [Tenant("default")]
    [SugarTable("T_User")]
    public class User
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }


        [SugarColumn(UniqueGroupNameList = new string[] { "unique1" })]
        public string UserName { get; set; } = String.Empty;
        public string? Password { get; set; }
        public string? Salt { get; set; }

        /// <summary>
        /// 姓名
        /// </summary>
        public string? Name { get; set; }

        /// <summary>
        /// 邮箱
        /// </summary>
        public string? Email { get; set; }

        /// <summary>
        /// 手机号
        /// </summary>
        public string? Phone { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 登录时间
        /// </summary>
        public DateTime? LoginTime { get; set; }

        /// <summary>
        /// 上次登录时间
        /// </summary>
        public DateTime LastLoginTime { get; set; }

        /// <summary>
        /// 登录次数
        /// </summary>
        public int? Count { get; set; }

        /// <summary>
        /// 是否是系统管理员
        /// </summary>
        public bool? IsSystemAdmin { set; get; }

        /// <summary>
        /// 头像
        /// </summary>
        public string? Avatar { set; get; }

        /// <summary>
        /// 是否停用
        /// </summary>
        public bool? IsDeleted { set; get; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? ModifyTime { get; set; }
        public string Remark { get; set; }

        /// <summary>
        /// 星级
        /// </summary>
        public decimal? Level { get; set; }
        /// <summary>
        /// 工号
        /// </summary>
        public string EmpNo { get; set; }
    }
}
